package pun.potato;

public class Pun {
	/**
	 * The content of the message
	 */
	String message;

	int sid;
	String name;
	boolean isMine = false;
	boolean isStatusMessage;
	int pun_id;
	boolean upvoted;

	/**
	 * Constructor to make a Message object
	 */
	public Pun(String message, int sid, String name, int id) {
		super();
		this.message = message;
		this.name = name;
		this.sid = sid;
		this.isStatusMessage = false;
		this.pun_id = id;
		this.upvoted = false;
	}
	/**
	 * Constructor to make a status Message object
	 * consider the parameters are swaped from default Message constructor,
	 *  not a good approach but have to go with it.
	 */
	public Pun(boolean status, String message) {
		super();
		this.message = message;
		this.sid = 0;
		this.isStatusMessage = status;
	}
	
	public void setUpvoted(boolean s){
		upvoted = s;
	}
	public boolean getUpvoted(){
		return upvoted;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String getName(){
		return this.name;
	}
	public int getSid() {
		return sid;
	}
	public void setSid(int s) {
		this.sid = s;
	}
	
	public int getPunId(){
		return pun_id;
	}
	
	public boolean isStatusMessage() {
		return isStatusMessage;
	}
	public void setStatusMessage(boolean isStatusMessage) {
		this.isStatusMessage = isStatusMessage;
	}
	public boolean isMine(){
		return isMine;
	}
	public void setIsMine(boolean mine) {
		isMine = mine;
	}

}
